Xbasic

A5RunXbasicAfterClosingWindows Function

Syntax

V A5RunXbasicAfterClosingWindows(C Xbasic [,C msg ])

Arguments

Xbasic

Xbasic code saved in a character variable.

msg

Optional. The message to display in the warning dialog box.

Description

The A5RunXbasicAfterClosingWindows() function closes all open windows (and the tables behind them), runs Xbasic code, then restores the current window. This function is useful for performing <TBL>.PACK()operations that require exclusive access to a table.

Example

The following example, when attached to a button on the customer form, closes the form, displays a message box, executes the specified Xbasic code after the user presses OK, then redisplays the customer form.

dim code as C
code = <<%code% 
t = table.open("customer") 
t.pack() 
t.close() 
%code% 

A5RunXbasicAfterClosingWindows(code, "Temporary Shutdown" )

Limitations

Desktop applications only.

See Also